<?php

class Comment
{
	private $Id;
	private $IdAuthor;
	private $IdType;
	private $IdChallenge;
	private $IdSolution;
	private $Text;
	private $Date;
	
	public function getId()
	{
		if(!isset($this->Id))
			$this->setId(0);
		return $this->Id;
	}
	public function setId($id)
	{
		$this->Id = $id;
	}
	public function IsPersited()
	{
		return $this->getId() != 0;
	}

	public function getIdAuthor()
	{
		if(!isset($this->IdAuthor))
			$this->setIdAuthor(0);
		return $this->IdAuthor;
	}
	public function setIdAuthor($idAuthor)
	{
		$this->IdAuthor = $idAuthor;
	}

	public function getIdType()
	{
		if(!isset($this->IdType))
			$this->setIdType(0);
		return $this->IdType;
	}
	public function setIdType($idType)
	{
		$this->IdType = $idType;
	}
	
	public function getIdChallenge()
	{
		if(!isset($this->IdChallenge))
			$this->setIdChallenge(0);
		return $this->IdChallenge;
	}
	public function setIdChallenge($idChallenge)
	{
		$this->IdChallenge = $idChallenge;
	}

	public function getIdSolution()
	{
		if(!isset($this->IdSolution))
			$this->setIdSolution(0);
		return $this->IdSolution;
	}
	public function setIdSolution($idSolution)
	{
		$this->IdSolution = $idSolution;
	}
	
	public function getText()
	{
		if(!isset($this->Text))
			$this->setText('');
		return $this->Text;
	}
	public function setText($text)
	{
		$this->Text = $text;
	}
	
	public function getDate()
	{
		if(!isset($this->Date))
			$this->setDate(date("Y-m-d H:i:s"));
		return $this->Date;
	}
	public function setDate($date)
	{
		$this->Date = $date;
	}
}
?>